package cn.com.bluemoon.daps.api.sys.factory;

import cn.com.bluemoon.daps.api.sys.RemoteDapNoticeInfoService;
import cn.com.bluemoon.daps.common.domain.ResultBean;
import cn.com.bluemoon.daps.system.dto.NoticeSendRequestDto;
import feign.hystrix.FallbackFactory;

import javax.validation.Valid;

/**
 * @author Jarod.Kong
 */
public class RemoteDapNoticeInfoServiceFallbackFactory implements FallbackFactory<RemoteDapNoticeInfoService> {
    @Override
    public RemoteDapNoticeInfoService create(Throwable throwable) {
        return new RemoteDapNoticeInfoService() {
            @Override
            public ResultBean<Boolean> send(@Valid NoticeSendRequestDto sendRequestDto) {
                return ResultBean.error("发送失败");
            }

        };
    }
}
